﻿#ifndef ConfigOperate_H
#define ConfigOperate_H
#include <QSettings>
#include <QFileInfo>
#include <QDebug>
#include <QString>

#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

class ConfigOperate
{
public:
    ConfigOperate();

    void initSystemInfo();
    void readSystemInfo();
    void writeSystemInfo();

    bool writeInit(QString group, QString key, QString value);
    bool readInit(QString group, QString key, QString &value);

    QString readIpAdress();
    void writeIpAdress(QString value);

    QString readPort();
    void writePort(QString value);

private:
    QString m_cfgFile;
    QString m_ipAddress;
    QString m_port;
};

#endif // ConfigOperate_H
